package com.sky.mapper;

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author iTaotao
 * @version 1.0.0
 * @ClassName DishFlavorMapper.java
 * @Description
 * @createTime 2023年07月28日 14:16:00
 */
@Mapper
public interface DishFlavorMapper {
    /**
     * 插入分支
     *
     * @param flavors 口味
     */
    void insertBranch(List<DishFlavor> flavors);

    /**
     * 删除风味菜id
     *
     * @param dishIds 菜id
     */
    void deleteFlavorByDishId(List<Long> dishIds);

    /**
     * 选择味道菜id
     *
     * @param dishId 菜id
     * @return {@link List}<{@link DishFlavor}>
     */
    @Select("select * from dish_flavor where dish_id = #{dishId}")
    List<DishFlavor> selectFlavorByDishId(Long dishId);
}
